home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (c) 1991, 1992 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that the name of Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Silicon Graphics.
- *
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- *
- * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE
- * POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
- // -*- C++ -*-
-
- /*
- * Copyright (C) 1990,91,92 Silicon Graphics, Inc.
- *
- _______________________________________________________________________
- ______________ S I L I C O N G R A P H I C S I N C . ____________
- |
- | $Revision: 1.1000 $
- |
- | Classes: SvManipList
- |
- | Author(s): David Mott
- |
- ______________ S I L I C O N G R A P H I C S I N C . ____________
- _______________________________________________________________________
- */
-
- #ifndef _SV_MANIP_LIST_
- #define _SV_MANIP_LIST_
-
-
- // This class helps keep track of path,manipulator pairs.
-
- class SbPList;
- class SoPath;
- class SoManipulator;
-
- // You can add a path/manipulator pair to the list.
- // Methods let you find the index of this pair based on either
- // the path or the manip. You can then use the index to get the
- // manip or the path, or remove the pair from the list.
-
- class SvManipList {
- public:
- SvManipList();
- ~SvManipList();
-
- int getLength() const;
-
- // append will ref() the path and the manip
- void append(SoPath *p, SoManipulator *m);
-
- // return the index of the path/manip pair.
- // use this index in calls to remove(), getPath(), getManip()
- int find(SoPath *p) const;
- int find(SoManipulator *m) const;
-
- // remove will unref() the path and the manip
- void remove(int which);
-
- // these return the path and the manip.
- SoPath * getPath(int which) const;
- SoManipulator * getManip(int which) const;
-
- private:
- SbPList * list;
- };
-
- #endif // _SV_MANIP_LIST_
-